﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="SubCatArticleList.aspx.cs" Inherits="Admin_SubCatArticleList" %>

<%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <!--  start page-heading -->
    <div id="page-heading">
        <div style="width: 967px;">
            <table border="0" width="100%" cellpadding="0" cellspacing="0" class="content-table">
                <tr>
                    <th class="topleft">
                    </th>
                    <td class="tbl-border-top">
                        &nbsp;</td>
                    <th class="topright">
                    </th>
                </tr>
                <tr>
                    <td class="tbl-border-left">
                    </td>
                    <td>
                        <div class="content-table-inner">
                            <div class="linelargeSearch" style="margin-bottom: 15px;">
                                <div class="contenttextLarge" style="float: left">
                                    <strong>Title:</strong>
                                    <asp:TextBox ID="txtTitle" CssClass="tieude" runat="server"></asp:TextBox>
                                    <strong style="margin-right: 10px; margin-left: 10px;">Category:</strong>
                                    <asp:DropDownList runat="server" ID="ddlCategory">
                                    </asp:DropDownList>
                                    <asp:LinkButton ID="linkSearch" runat="server" OnClick="btnSearch_OnClick">
                                        <img src="images/Search.png" onmouseover="this.src='images/SearchMouseOver.png';" onmouseout="this.src='images/Search.png';" alt="Search" /></asp:LinkButton>
                                    <asp:LinkButton ID="linkSearchAll" runat="server" OnClick="btnSearchAll_OnClick">
                                        <img src="images/SearchAll.png" onmouseover="this.src='images/SearchAllMouseOver.png';" onmouseout="this.src='images/SearchAll.png';" alt="Search" /></asp:LinkButton>
                                </div>
                            </div>
                            <div class="linelargeSearch">
                                <div class="contenttext" style="width: 500px;">
                                </div>
                            </div>
                    </td>
                    <td class="tbl-border-right">
                    </td>
                </tr>
                <tr>
                    <th class="sized bottomleft">
                    </th>
                    <td class="tbl-border-bottom">
                        &nbsp;</td>
                    <th class="sized bottomright">
                    </th>
                </tr>
            </table>
        </div>
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;</td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <!--  start table-content  -->
                    <div id="table-content">
                        <div style="color: Red; font-weight: bold; text-align: center;">
                            <asp:Literal ID="lb_error" runat="server"></asp:Literal>
                        </div>
                        <!--  start product-table ..................................................................................... -->
                        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                            <asp:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_OnItemDataBound"
                                OnItemCommand="rptList_OnItemCommand">
                                <HeaderTemplate>
                                    <tr>
                                        <th class="table-header-check" align="center" style="color: White;">
                                            No
                                        </th>
                                        <th class="table-header-check" align="center">
                                            <asp:CheckBox ID="checkall" onclick='CheckAll(this)' runat="server" />
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <asp:LinkButton ID="lbtNote" runat="server" CommandArgument="ASC" CommandName="sortName">Title</asp:LinkButton>
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <a href="">Order</a>
                                        </th>
                                        <th class="table-header-repeat line-left">
                                            <a href="">Mã</a></th>
                                        <th class="table-header-repeat line-left">
                                            <a href="">Category</a></th>
                                        <th class="table-header-repeat line-left">
                                            <a href="">View SubCategory</a></th>
                                        <th class="table-header-options line-left">
                                            <a href="">Options</a></th>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr class="alternate-row" id="tr" runat="server">
                                        <td align="center">
                                            <asp:Literal ID="ltrNo" runat="server"></asp:Literal>
                                        </td>
                                        <td align="center">
                                            <asp:CheckBox runat="server" ID="chkDelete" />
                                            <asp:HiddenField ID="hidID" runat="server" />
                                        </td>
                                        <td>
                                            <a href="AddSubCategory.aspx?id=<%#Eval("SubCategoryID")%>">
                                                <asp:Literal runat="server" ID="ltrName"></asp:Literal></a>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtOrder" Width="50"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lbl_code"></asp:Label>
                                        </td>
                                        <td align="center">
                                            <asp:Literal runat="server" ID="ltrParent"></asp:Literal>
                                        </td>
                                        <td align="center">
                                            <asp:LinkButton runat="server" ID="lbtSubCat" Text="Xem danh mục con" CommandName="ViewSubcat"
                                                CommandArgument='<%#Eval("SubCategoryID")%>'></asp:LinkButton>
                                        </td>
                                        <td class="options-width" align="center">
                                            <a href="AddSubCategory.aspx?id=<%#Eval("SubCategoryID")%>" title="Edit" class="icon-1 info-tooltip">
                                            </a>
                                            <asp:LinkButton CssClass="icon-2 info-tooltip" ID="lndelete" OnClientClick="javascript: return confirm('Are you sure you want to delete this item?');"
                                                runat="server" OnClick="lndelete_Click" CausesValidation="false" ToolTip="Delete"></asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                        <!--  end product-table................................... -->
                    </div>
                    <!--  end content-table  -->
                    <!--  start actions-box ............................................... -->
                    <div id="actions-box">
                        <a href="" class="action-slider"></a>
                        <div id="actions-box-slider">
                            <a href="AddSubCategory.aspx" class="action-edit">Add</a>
                            <asp:LinkButton CssClass="action-delete" ID="lndelete" OnClientClick="javascript: return confirm('Are you sure you want to delete this item?');"
                                runat="server" OnClick="lndelete_Click" CausesValidation="false">Delete</asp:LinkButton>
                            <%-- <a href="" class="action-delete">
                             
                             Delete</a>--%>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="actions-box">
                        <asp:LinkButton ID="linkUpdate" runat="server" OnClick="btnSave_OnClick">
                                        <img src="images/Update.png" onmouseover="this.src='images/UpdateMouseOver.png';" onmouseout="this.src='images/Update.png';" alt="Search" /></asp:LinkButton>
                    </div>
                    <!-- end actions-box........... -->
                    <!--  start paging..................................................... -->
                    <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
                        <tr>
                            <td>
                                <div style="width: 600px; float: left;">
                                    <div class="pages a_right" style="padding-bottom: 3px;" align="center">
                                        <strong>
                                            <cc1:PagerV2_8 ID="hyperlinkPager" runat="server" CompactModePageCount="5" GenerateFirstLastSection="true"
                                                OnCommand="pager_Command" GeneratePagerInfoSection="false" GenerateSmartShortCuts="false"
                                                GenerateHiddenHyperlinks="false" NormalModePageCount="5" PageSize="8" RTL="False"
                                                FirstClause="«" LastClause="»" NextClause="›" PreviousClause="‹" />
                                        </strong>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <!--  end paging................ -->
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner ............................................END  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;</td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <div class="clear">
        &nbsp;</div>

    <script type="text/javascript">
       function CheckAll(obj)
        {
            // find any item not check
            var countUncheck = 0;
            var checkAll = true;
            var checkList = document.getElementsByTagName("input");
            if(!obj.checked)
            checkAll = false;
            for(var i = 0 ; i < checkList.length ; i++)
            { 
                if(checkList[i].type == 'checkbox' && checkList[i].id.indexOf("chkDelete") >= 0 )
                {
                checkList[i].checked = checkAll;
                }
            } 
    }
      
    </script>

</asp:Content>
